package com.heima.wemedia;

import com.heima.aliyun.scan.GreenScan;
import com.heima.aliyun.scan.ScanResult;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.ArrayList;

@SpringBootTest
public class textTxt {
    @Autowired
    GreenScan greenScan;

    @Test
    public void text01(){
        try {
            greenScan.greenTextScan("藜蔴麦，贩卖冰毒个锤锤");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    @Test
    public void imageTest(){
        ArrayList<String> strings = new ArrayList<>();
        strings.add("https://hmtt-root.oss-cn-shanghai.aliyuncs.com/hmtt/test/%E7%BE%8E%E5%A5%B32.jpg");
        try {
            ScanResult scanResult = greenScan.imageUrlScan(strings);
            System.out.println(scanResult);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
